<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>slibc: slibc/string_templates_.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">slibc
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_4d4a740b65ecc1faa3510c186d2f00c5.html">slibc</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">string_templates_.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="string__templates___8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (C) 2011-2012 SBA Research gGmbh</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">   This file is part of the Slibc Library.</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">   The Slibc Library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">   modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment">   License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">   version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">   The Slibc library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">   Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">   You should have received a copy of the GNU Lesser General Public</span>
<a name="l00016"></a>00016 <span class="comment">   License along with the Slibc Library; if not, see</span>
<a name="l00017"></a>00017 <span class="comment">   &lt;http://www.gnu.org/licenses/&gt;.  </span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00048"></a>00048 <span class="preprocessor">#ifndef SLIBC_STRING_TEMPLATES_HPP</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define SLIBC_STRING_TEMPLATES_HPP</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &quot;<a class="code" href="string_8h.html" title="Contains those _s-functions that are related to strings.">./string.h</a>&quot;</span>
<a name="l00052"></a>00052 
<a name="l00065"></a><a class="code" href="string__templates___8hpp.html#a0c89cb264d58cd861917ba06cd83d8c5">00065</a> <span class="keyword">template</span>&lt;r<span class="keywordtype">size_t</span> s1max&gt; errno_t <a class="code" href="string_8h.html#a8328d88ab6bc728a5d2768340470a86c" title="The strcpy_s function copies the string s2 to s1.">strcpy_s</a>(<span class="keywordtype">char</span> (&amp;s1)[s1max], <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict s2)
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067         <span class="keywordflow">return</span> <a class="code" href="string_8h.html#a8328d88ab6bc728a5d2768340470a86c" title="The strcpy_s function copies the string s2 to s1.">strcpy_s</a>(s1, s1max, s2);
<a name="l00068"></a>00068 }
<a name="l00069"></a>00069 
<a name="l00084"></a><a class="code" href="string__templates___8hpp.html#a473e520b9b3336a8796e1f9f28e098d3">00084</a> <span class="keyword">template</span>&lt;r<span class="keywordtype">size_t</span> s1max&gt; errno_t <a class="code" href="string_8h.html#ac6982f578dbc46c470864f175289fec0" title="The strncpy_s function copies not more than n characters from s2 to s1.">strncpy_s</a>(<span class="keywordtype">char</span> (&amp;s1)[s1max], <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict s2, rsize_t n)
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086         <span class="keywordflow">return</span> <a class="code" href="string_8h.html#ac6982f578dbc46c470864f175289fec0" title="The strncpy_s function copies not more than n characters from s2 to s1.">strncpy_s</a>(s1, s1max, s2, n);
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 
<a name="l00089"></a>00089 
<a name="l00102"></a><a class="code" href="string__templates___8hpp.html#ac67b0a45551b7b4ca8bb38e7a009e691">00102</a> <span class="keyword">template</span>&lt;r<span class="keywordtype">size_t</span> s1max&gt; errno_t <a class="code" href="string_8h.html#ae3341e764378a4641f16890366c4e213" title="The strcat_s function copies the string s2 to the end of s1.">strcat_s</a>(<span class="keywordtype">char</span> (&amp;s1)[s1max],
<a name="l00103"></a>00103                                                                                  <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict s2)
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105   <span class="keywordflow">return</span> <a class="code" href="string_8h.html#ae3341e764378a4641f16890366c4e213" title="The strcat_s function copies the string s2 to the end of s1.">strcat_s</a>(s1, s1max, s2);
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107 
<a name="l00121"></a><a class="code" href="string__templates___8hpp.html#a406937d6abe4c8cd48cb98cd0de85588">00121</a> <span class="keyword">template</span>&lt;r<span class="keywordtype">size_t</span> s1max&gt; errno_t <a class="code" href="string_8h.html#a37d94a5d2fb891d453ae0a7c6bf13623" title="The strncat_s function copies not more than n characters of the string s2 to the end of s1...">strncat_s</a>(<span class="keywordtype">char</span> (&amp;s1)[s1max],
<a name="l00122"></a>00122                                                                                  <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict s2, rsize_t n)
<a name="l00123"></a>00123 {
<a name="l00124"></a>00124   <span class="keywordflow">return</span> <a class="code" href="string_8h.html#a37d94a5d2fb891d453ae0a7c6bf13623" title="The strncat_s function copies not more than n characters of the string s2 to the end of s1...">strncat_s</a>(s1, s1max, s2, n);
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 31 2012 13:48:20 for slibc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
